using System;
using System.Drawing;
using System.Windows.Forms;
using System.Drawing.Drawing2D;
class FormSize :Form
{

	static void Main()
	{
		Application.Run(new FormSize());
	}
	public FormSize()
	{
		Text="FormSize";
		BackColor=SystemColors.Window;//.White;
		ForeColor=SystemColors.WindowText;
	}
	protected override void OnMove(EventArgs ea)
	{
		Invalidate();
	}
	protected override void OnResize(EventArgs ea)
	{
		Invalidate();
	}
	protected override void OnPaint(PaintEventArgs pea)
	{
		Graphics g=pea.Graphics;
		string str="ZHUBICEN,HELLO wsdasdfasdfsdafsdaWORLD!";
		SizeF sizeF=g.MeasureString(str,Font);
		g.DrawRectangle(SystemPens.WindowText ,0,0,sizeF.Width,sizeF.Height);
		g.DrawString(str,Font,SystemBrushes.WindowText,0,0);

		
	}



	
}